The present invention relates to an image converting apparatus and method for transforming a two-dimensional image input video signal onto a three-dimensional surface, while depicting illumination thereof by a spot light source.
Known image processing apparatus provide the capability of converting video signals representing two-dimensional images into transformed video signals representing cylindrically shaped three-dimensional images. The operation of the prior art apparatus is illustrated with reference to FIGS. 5(A) and 5(B). Referring to FIG. 5(A) an input video signal representing an image IM.sub.1 is divided into a plurality of blocks corresponding with respective portions of the two-dimensional image, such as the illustrated block B.sub.1. Referring also to FIG. 5(B) the input video signal representing the two-dimensional image depicted in FIG. 5(A) is transformed to depict a three-dimensional, cylindrical image by transforming each of the blocks of the video signal representing corresponding portions of the image IM.sub.1 (for example, the block B.sub.1) into corresponding portions of the three-dimensional, cylindrical image (for example, the block B.sub.2 corresponding with the original block B.sub.1).
U.S. Pat. No. 4,965,844, assigned to the assignee of the present application, describes a further image converting apparatus which provides an image of the type illustrated in FIG. 5(B) which is shaded to depict illumination by a diverging beam of light from a desired position, such as the image illustrated in FIG. 6(A).
A block diagram of the known image converting apparatus is provided in FIG. 7. With reference to FIG. 7, a host computer 1, such as a microcomputer, is coupled with a mass memory 2 and an input/output device 3. The mass memory 2 contains programs stored in advance such as a conversion program for converting a video signal representing a two-dimensional image into a transformed video signal representing a three-dimensional cylindrical image, as described above.
When a desired program stored in the mass memory 2 is designated by means of-the input/output device 3, the host computer 1 reads the program from the mass memory 2 and, pursuant to such program, generates data necessary for carrying out the image conversion, as described below. The generated data is then stored by the host computer 1 in a buffer memory 4. Pursuant to the image conversion process, a target image is divided into a plurality of blocks and the image transformation process is carried out block by block. In the case of the two-dimensional image as depicted in FIG. 5(A), the original image IM.sub.1 thereof comprises 64 by 96 blocks, each block including 8.times.8 pixels. The converted image IM.sub.2, as illustrated in FIG. 5(B), includes 128.times.128 blocks, each including 4.times.6 pixels. The selected program determines a post-conversion position of a representative point of each block in the original image IM.sub.1 in accordance with X, Y and Z three-dimensional coordinates. The results of such determinations are then stored in the buffer memory 4 of FIG. 7.
It will be seen that the number of blocks in the original image differs from the number of blocks in the transformed image in the above illustrative operation. Consequently the blocks of the converted image do not necessarily correspond on a one-to-one basis with the blocks of the original image. Nevertheless, the resulting converted image depends generally on which block the representative point of each given block (f or example, block B.sub.1) of the original image IM.sub.1 is placed (for example, block B.sub.2 in FIG. 5(B)).
The data for the converted image are obtained in the following manner. With reference to FIG. 8(A), four blocks of the original image have respective representative points a, b, c and d. These four blocks, as illustrated in FIG. 8(A), surround a central block having a representative point P. Once the conversion has been accomplished, the point P is relocated to a position P' as illustrated in FIG. 8(B), while the positions of the representative points a, b, c and d of the surrounding blocks in FIG. 8(A) are relocated to the positions indicated by the points A, B, C and D, respectively, in FIG. 8(B).
The three-dimensional coordinates of the post-conversion representative points, such as points A, B, C, D and P' as illustrated in FIG. 8(B)), define the type of surface to be formed by the transformation process. A post-conversion surface is then produced by linear approximation in the vicinity of each representative point as follows.
In order to approximate the portion of the surface containing the point P' by such linear approximation, the direction of that surface is defined as parallel to two segment vectors: the segment vector AC connecting the points A and C in FIG. 8(B), and the segment vector DB connecting the points D and B. In FIG. 8(B), the linearly approximated surface containing the representative point P' is defined by two unit vectors: a unit vector PX parallel to the vector AC and a unit vector PY parallel to the vector DB. In this fashion, the surface corresponding with each representative point is linearly approximated, until the entire surface of the converted image is thus obtained.
The magnitude of the vector PX and that of the vector PY are each made proportional to the distances between the representative points A, C and D, B, respectively, of the adjacent blocks as follows: EQU PX=AC/4 (1) EQU PY=DB/4 (2)
As described above, the buffer memory 4 contains data required for transforming the representative points of the blocks of the original image IM.sub.1, and to obtain the post-conversion positions of these representative points, as well as to convert the difference values involved. Such data in the buffer memory 4 is provided to an image converting circuit 5 which also receives the input image data from an input terminal 6. The input image data is converted by the circuit 5 in accordance with the data received thereby from the buffer memory 4 and the converted data is provided at an output terminal 7.
As a preliminary step, the image converting circuit 5 designates a target region of the input image to be converted using the data from the buffer memory 4. That is, the image converting circuit 5 first specifies to what region a given region (for example, region B.sub.1) in the original image IM.sub.1 as illustrated in FIG. 5(A) will be transformed (for example, the region B2 in the converted image IM.sub.2 as illustrated in FIG. 5(B)).
According to this process, read addresses for every pixel in the target region are obtained and placed in an input buffer memory of the image converting circuit 5 of FIG. 7. Then in accordance with each read address thus obtained from the input buffer memory, the corresponding pixel data is obtained and written in an output buffer memory at an address representing the post-conversion position thereof.
The image conversion process is carried out concurrently with a smoothing process whereby jagged edge portions which may appear between the background and the image contour are smoothed out by interpolating sampling points in the image to produce additional sampling points. The additional sampling points produced by interpolation are likewise written in the output buffer memory.
The foregoing describes the basic process for converting a video signal representing a two-dimensional image into a transformed video signal representing a three-dimensional image in accordance with the prior art system. The prior art system also includes a shading coefficient, memory 8 which serves to provide the output image with shading to depict illumination by diverging light from a source located at a particular position relative to the converted image. For this purpose,. the memory 8 provides shading coefficients to the image converting circuit 5 for weighting the image data output therefrom to produce a shading effect such as that illustrated in FIG. 6(A). If the image is monochromatic, the brightness level thereof is changed in accordance with the shading coefficient; if the image is a color image, the hue and/or brightness level thereof is varied depending upon the degree of shading represented by the shading coefficients.
With reference to FIG. 9, an illustrative method for deriving the shading coefficients is illustrated therein. Each of the rectangular areas depicted in FIG. 9 represents a portion of a three-dimensional image surface approximated by corresponding plane surfaces each containing at least three sampling points. A normal vector i is obtained for each such plane surface and a vector a oriented from each plane surface toward the light source is likewise obtained. The inner product of the vector a and the normal vector i is obtained for each of the plane surfaces and used to find a shading coefficient therefor. The same shading coefficient typically is applied to all pixels contained in a single plane surface. In the alternative, a different shading coefficient may be obtained for application to each pixel on an individual basis.
It will be appreciated that the known image conversion apparatus described above serves to apply a shading effect to an entire three-dimensional image and is, thus, of limited usefulness in creating special three-dimensional video effects.